package com.example.myuser.exception;

import com.alibaba.csp.sentinel.slots.block.BlockException;

public class SentinelException {

    public String handleException(BlockException ex){
        return "被流控了";
    }

    // Fallback 异常处理函数，参数与原方法hello2一致或加一个 Throwable 类型的参数.
    public String fallbackException(Throwable t){
        return "被异常降级了";
    }
}
